#pragma once

#include "Renderer/Texture.h"
#include "glad/glad.h"
namespace Orange {
	class OpenGlTexture2D : public Texture2D 
	{
	public:
		OpenGlTexture2D(const uint32_t& width, const uint32_t& height);
		OpenGlTexture2D(const std::string& path);
		virtual ~OpenGlTexture2D();
		virtual	uint32_t GetWidth() override { return m_Width; };
		virtual	uint32_t GetHeight() override { return m_Height; };
		virtual void Bind(uint32_t sort) override;
		virtual bool operator==(const Texture& other)const override {
			return m_RendererId == ((OpenGlTexture2D&)other).m_RendererId;
		}; 
		virtual unsigned int GetRendererId()const {
			return m_RendererId;
		};
		void SetData(void* data , uint32_t size) override;

	private:
		std::string m_Path;
		int m_Width;
		int m_Height;

		unsigned int m_RendererId;
		GLenum m_InternalFormat;
		GLenum m_Format;
	};
}